package com.example.threaddemo.t19;


import java.util.Random;

/**
 * @Author：wlz
 * @Package：com.example.threaddemo.t19
 * @Project：threaddemo
 * @name：MyThread
 * @Date：2023/3/30 22:58
 * @Filename：MyThread
 */
public class MyThread extends Thread{
    @Override
    public void run() {
        long beginTime = System.currentTimeMillis();
        long result = 0;
        for (int i = 0; i < 50000; i++) {
            Random random = new Random();
            random.nextInt();
            result +=i;
        }
        long endTime = System.currentTimeMillis();
        System.out.println("time1:"+(endTime-beginTime));
    }
}
